Restore flush logic (Nuclear option for state recovery)#2121
Merged
Conversation
MarcosNicolau
approved these changes
Sep 17, 2025
Member
MarcosNicolau
left a comment
There was a problem hiding this comment.
Tested with description from #2119.
JuArce
requested changes
Sep 17, 2025
Collaborator
JuArce
left a comment
There was a problem hiding this comment.
The queue is being nuked, but the users connection is not being closed
Logs from batcher:
...
...
[2025-09-17T17:28:44Z WARN aligned_batcher] User 0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f has insufficient balance, flushing entire queue as safety measure
[2025-09-17T17:28:44Z WARN aligned_batcher] Resetting state... Flushing queue and nonces
[2025-09-17T17:28:44Z ERROR aligned_batcher] Batch finalization failed: Batcher state was corrupted and flushed: Queue and user states flushed due to insufficient balance for user 0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f
[2025-09-17T17:28:44Z INFO aligned_batcher] State was corrupted and flushed - not restoring proofs
[2025-09-17T17:28:44Z ERROR aligned_batcher] Error when handling new block: Batcher state was corrupted and flushed: Queue and user states flushed due to insufficient balance for user 0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f
...
...
Logs from user
...
...
[2025-09-17T17:25:42Z WARN aligned] Nonce: 0
[2025-09-17T17:25:42Z INFO aligned] Randomizing proof generator address for each proof...
[2025-09-17T17:25:42Z INFO aligned] Submitting proofs to the Aligned batcher...
[2025-09-17T17:25:42Z INFO aligned_sdk::communication::messaging] All proofs sent
Member
|
Following Juli's comment, it seems we are not sending the message to the |
b1d1312 to
c59f69a
Compare
JuArce
approved these changes
Oct 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restore flush logic (Nuclear option for state recovery)
Description
Restore flush logic (Nuclear option for state recovery)
How to test
You can test it with an anvil rich account private key:
crates/batcher/src/lib.rs) code so that you have enough time to unlock and withdraw eth from the batcher payment contract:cd crates/cli cargo run --release -- deposit-to-batcher --amount 1ether --private_key 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 --network devnet --rpc_url http://localhost:8545cargo run --release -- submit \ --proving_system Risc0 \ --proof ../../scripts/test_files/risc_zero/no_public_inputs/risc_zero_no_pub_input_3_0_3.proof \ --vm_program ../../scripts/test_files/risc_zero/no_public_inputs/risc_zero_no_pub_input_id_3_0_3.bin \ --rpc_url http://localhost:8545 \ --network devnet \ --instant_fee_estimate \ --private_key 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 \ --random_address[2025-09-15T15:13:17Z WARN aligned_batcher] SLEEPING BEFORE FINALIZING BLOCK ADVANCE BLOCKS NOW!!!!Now hurry up (you only have 60 seconds to unlock, advance blocks and withdraw from the batcher payment service)
cast send 0x7bc06c482DEAd17c0e297aFbC32f6e63d3846650 "unlock()" --rpc-url http://localhost:8545 --private-key 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97anvilseconds to not wait:cast call 0x7bc06c482DEAd17c0e297aFbC32f6e63d3846650 "user_balances(address)" --rpc-url http://localhost:8545 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f